<?php //include_once 'Application/Views/view/header.php'; ?>

<form action="/app_registro_vehiculos/principal.php?controller=Infraction&action=insert" method="post">
    <center>
        <fieldset style="width: 250px">                
            <table>
                <tr>
                    <td>CODIGO DE INFRACCION</td>
                    <td><input type="text" name="infraccion" required placeholder="INFRACCION" autofocus maxlength="10"/></td>
                </tr>
                 <tr>
                    <td>PLACA</td>
                    <td><input type="text" name="placa" required placeholder="PLACA"  maxlength="7"/></td>
                </tr>
                <tr>
                    <td>TIPO</td>
                    <td>
                        <?php $objDb= new Class_Db();
                                  $objDb->selectManager()->connect();
                                  $query="select id_tipo,descripcion from tipo_infraccion";
                                  $consult=$objDb->selectManager()->select($query);
                                  //die('ddd'.count($consult));
                        ?>
                        <select  name="tipo">
                            <?php
                                  for($i=0;$i<count($consult);$i++){                                  
                            ?>
                            <option value="<?php echo $consult[$i][0] ?>"><?php echo $consult[$i][1] ?></option>
                            <?}?>
                        </select>
                    </td>
                    
                </tr>
                <tr>
                    <td>INFRACTOR</td>
                    <td><input type="text" name="infractor" required placeholder="INFRACTOR"  maxlength="100"/></td>
                </tr>
                <tr>
                    <td>FECHA DE INFRACCION</td>
                    <td><input type="date" name="fechaInfraccion" required placeholder="FECHA"/></td>
                </tr>
                <tr>
                    <td>LUGAR</td>
                    <td><input type="text" name="lugar" required placeholder="LUGAR"  maxlength="100" /></td>
                </tr>
                <tr>
                    <td>PRECIO</td>
                    <td><input type="text" name="precio" required placeholder="PRECIO" onkeypress="onlyNumbers();" /></td>
                </tr>
                <tr>
                    <td>DESCRIPCION</td>
                    <td><input type="text" name="descripcion" required placeholder="DESCRIPCION" maxlength="100" /></td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                        <input type="submit" value="Guardar"  />
                    </td>
                </tr>
            </table>                
        </fieldset>             
    </center>
 </form>
<center>
   <!-- <div style="text-align: center">
        <?php include_once 'Application/Views/view/botonInicio.php'; ?>
    </div>-->
</center>
